package main

import (
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/middleware/logger"
	"github.com/kataras/iris/v12/middleware/recover"
	"github.com/kataras/iris/v12/mvc"
)

func main() {
	app := iris.New()
	app.Use(logger.New())
	app.Use(recover.New())
	mvc.New(app).Handle(new(MyController))

	app.Run(iris.Addr("localhost:8080"))
}

type MyController struct{}

func (c *MyController) BeforeActivation(b mvc.BeforeActivation) {
	b.Handle(
		"GET",
		"/custom",
		"CustomHandlerWithoutFollowingTheNamingGuide",
	)
}

func (c *MyController) CustomHandlerWithoutFollowingTheNamingGuide() string {
	return "fdasfafa"
}
